package com.mago.tis.utility;

/**
 * 
 * @author Piyush This is for writing the queries to be used in the application
 */
public interface QueryConstant {

	static final String CHECK_AUTHENTICATION = "select * from JBSULT ult where ult.USER_FNAME = ':0:' and ult.PASSWORD = ':1:'";
	static final String SAVE_MASTER_DATA = "insert into TISMCT(SLIP_NO,TRUCK_NO,SUB_TRANSPORTER_NAME,VMS_IN_WB_NO,VMS_IN_WB_USER,VMS_IN_DATE,VMS_IN_TIME,VMS_TARE_WEIGHT,VMS_OUT_WB_NO,VMS_OUT_WB_USER,VMS_OUT_DATE,VMS_OUT_TIME,VMS_GROSS_WEIGHT,VMS_NET_WEIGHT,INVOICE_NO,ROYALITY_TYPE,ROYALTY_PASS_NO,EXCISE_AMOUNT,EDU_CESS_AMOUNT,HSECESS_AMOUNT,CLEAN_ENG_CESS_AMOUNT,ROYALTY_AMOUNT,BAL_ROYALTY_AMOUNT,VS_IN_WB_NO,VS_IN_WB_USER,VS_IN_DATE,VS_IN_TIME,VS_GROSS_WEIGHT,VS_OUT_WB_NO,VS_OUT_WB_USER,VS_OUT_DATE,VS_OUT_TIME,VS_TARE_WEIGHT,VS_NET_WEIGHT,DUMP_LOCATION,IS_BILLED,IS_ACTIVE,CREATED_DT,MODIFY_DT,EXTRA_FIELD1,EXTRA_FIELD2,EXTRA_FIELD3,CREATED_BY,MODIFY_BY) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
	static final String GET_MASTER_DATA = "select * from TISMCT where IS_BILLED = ':0:' and IS_ACTIVE = ':1:' order by CREATED_DT desc";
	static final String GET_CHALLAN_1__DATA = "select MASTER_ID,SLIP_NO,TRUCK_NO,SUB_TRANSPORTER_NAME,VMS_IN_WB_NO,VMS_IN_DATE,VMS_IN_TIME,VMS_TARE_WEIGHT,VMS_OUT_DATE,VMS_GROSS_WEIGHT,VMS_NET_WEIGHT,INVOICE_NO,VS_IN_DATE,VS_OUT_DATE,VS_TARE_WEIGHT,ROYALTY_PASS_NO,VS_NET_WEIGHT,DUMP_LOCATION,VS_GROSS_WEIGHT from TISMCT where IS_BILLED = ':0:' and IS_ACTIVE = ':1:' and MASTER_ID In (";
	static final String UPDATE_MASTER_DATA_AFTER_BILLING = "update TISMCT set IS_BILLED = ':0:' where IS_ACTIVE = ':1:' and MASTER_ID In (";
	
	// Other queries
	//static final String GET_PRIMARY_KEY = "select MAX(':0:') AS maxId FROM ':1:'";
	static final String SAVE_TRADER = "insert into TISTIT values(':0:',':1:',':2:',':3:',':4:',':5:',':6:',':7:',':8:',':9:',':10:',':11:',':12:',':13:',':14:',':15:',':16:',':17:',':18:',':19:',':20:',':21:',':22:',':23:',':24:',':25:')";
	static final String ALL_TRADERS = "SELECT * FROM TISTIT WHERE IS_ACTIVE=':0:' order by CREATED_DT desc";
	static final String deleteTrader = "UPDATE TISTIT SET IS_ACTIVE=':0:' WHERE COMPANY_ID=':1:'";
	static final String GET_TRADERS_ON_ID = "SELECT * FROM TISTIT WHERE COMPANY_ID=':0:'";
	static final String UPDATE_TRADER = "UPDATE TISTIT SET COMPANY_NAME=':1:', STREET_ADDRESS=':2:', CONTACT_NO =':3:',EMAIL_ID=':4:', DISCRIPTION=':5:', MODIFY_DT=':6:', MOBILE_NO=':7:',PAN_NO=':8:', BANK_NAME=':9:', ACCOUNT_NO=':10:', IFSC_CODE=':11:',MICR_CODE=':12:',MULTIPLY_FACTOR=':13:',LANDING_COST=':14:',EXTRA_FIELD1=':15:' WHERE COMPANY_ID=':0:'";
	static final String SAVE_FINAL_CHALLAN = "insert into TISMBT values(':0:',':1:',':2:',':3:',':4:',':5:',':6:',':7:',':8:',':9:',':10:',':11:',':12:',':13:')";
	static final String UPDATE_COMPANY = "UPDATE TISCDT SET COMPANY_NAME=':1:', COMPANY_ADDRESS=':2:' WHERE COMPANY_ID=:0:";
	static final String GET_COMPANY_ON_ID = "SELECT * FROM TISCDT WHERE COMPANY_ID=:0:";
	static final String UPDATE_ABOUT = "UPDATE TISCDT SET ABOUT=':1:' WHERE COMPANY_ID=:0:";
}
